home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / Installer SDK 1.2.3 / Upgrader 1.2.3 & Engines / Upgrader 1.2.3 / Plug-in Examples / SAM Virus Checker Plug-in / Plug-in Sources / SAMLauncher.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-24  |  3.4 KB  |  151 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        SAMLauncher.h
  3.  
  4.     Contains:    Definitions for the SAM Installer Plugin.
  5.     
  6.  
  7.     Written by:    Canice Bowe
  8.  
  9.     Copyright:    © 1996-97 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.     To Do:
  14. */
  15. #ifndef __SAM_PLUGIN__
  16. #define __SAM_PLUGIN__
  17.  
  18. #define kSAMPrefsResType    'sapr'            // <04> SAM plugin preference resource type.
  19. #define    kSAMBaseResIDIndex    12000
  20. #ifndef REZ                                        // <01> Don't want Rez to see the rest of the file
  21.  
  22. #ifdef __cplusplus                                // <01>
  23. extern "C" {
  24. #endif
  25.  
  26. #include <Types.h>
  27. #include <Events.h>
  28. #include <TextEdit.h>
  29.  
  30. #include "UpgraderPlugin.h"
  31.  
  32. enum    
  33.     {
  34.     kSAMflrfID            = kSAMBaseResIDIndex
  35.     };
  36.     
  37. enum 
  38.     {
  39.     kVirusPanelButtonState = 'vibs'
  40.     };
  41.     
  42. enum                                // Panel DITL resource ID's
  43.     {
  44.     kSAMPanelRsrcID     = kSAMBaseResIDIndex
  45.     };
  46.  
  47. enum                                // SAM panel items    
  48.     {
  49.     kContinueButton = 1,
  50.     kGoBackButton,
  51.     kHelpButton,
  52.     kScanForVirusesButton,
  53.     kRepairButton,
  54.     kDoNothingButton,
  55.     kTitleTextItem = 7,
  56.     kSAMPanelTextItem = 8
  57.     };
  58.  
  59. enum                                // Bit masks for the 'flags' field of the SAMPrefs struct
  60.     {
  61.     kHelpTextInFile        = 0x8000
  62.     };
  63.     
  64. enum {
  65.     kMaxAttachedVolumes = 100                            // <09>                                                // max number of volumes which can be 'attached' to the mac
  66. };
  67.  
  68. typedef enum 
  69.     {    
  70.     kScanForViruses,
  71.     kRepair,
  72.     kDoNothing
  73.     }RadioButtonStates;    
  74.     
  75. // Typedefs
  76.     
  77. typedef struct                        // SAM plugin preference resource struture
  78.     {
  79.     UInt16    format;
  80.     UInt16    flags;
  81.     UInt16    mainTextReferenceID;
  82.     UInt16    helpTextReferenceID;
  83.     UInt16    baseHelpPICTResID;
  84.     UInt16    SAMSTRListRsrsID;
  85.     UInt16    SAMAppFileRefRsrsID;
  86.     } SAMPrefs, *SAMPrefsPtr, **SAMPrefsHandle;
  87.  
  88. struct VolumeList {                                        // <09>
  89.     Str255        volName;
  90.     short        volRefNum;
  91.     short        sswInstalled;
  92. };
  93. typedef struct VolumeList VolumeList;
  94.  
  95. /*******************************************************************
  96. File Mgt. stuff
  97. *******************************************************************/
  98. #define BTst( a, b )                ( ( ( unsigned long ) ( a ) & ( 1UL << ( b ) ) ) != 0 )
  99. const SInt16    badVol                        = -32768;                // A bad vRefNum
  100. const SInt16    kMaxSCSIDRefNum             = 0xFFDF;                 // Driver refNum for the SCSI device #0 (-33) 
  101. const SInt16    kMinSCSIDRefNum             = 0xFFD8;                // Driver refNum for the SCSI device #7 (-40) 
  102. const SInt16    kFloppyDriveRefNum            = 0xFFFB;                // Driver refNum for the floppy drive (-5)
  103. const SInt16    offlineRefNum                = 0;                    // The cancel button
  104. const SInt16    floppy1DrvNum                = 1;
  105. const SInt16    floppy2DrvNum                = 2;
  106. const SInt16    floppy3DrvNum                = 3;
  107. const SInt16    kHFSFileManagerID            = 0;
  108. const SInt16    AppleShareFileManagerID        = 1;                    // File System ID for AppleShare
  109. const SInt16    TOPSFileManagerID            = 0x11;                    // File System ID for TOPS
  110. const SInt16    SONYRefNum                     = -5;                    // .Sony Driver 
  111. const SInt16    oldHDRefNum                    = -2;                    // Old HD 20 Driver
  112. const SInt16    kHighSierraFileManagerID     = 0x4242;
  113. const SInt16    kISO9660FileManagerID         = 0x4147;
  114. const SInt16    kAudioCDFileManagerID         = 0x4A48;
  115. const SInt16    kNoStartupDevice            = 0x6666;                // PRAM value when there is no valid startup device (extracted from "Startup Disk" cdev)
  116.  
  117. enum LockTypes {
  118.     kUnlocked,
  119.     kHWLock,
  120.     kSWLock,
  121.     kNoAccess
  122. };
  123. typedef enum LockTypes LockTypes;
  124.  
  125. enum VolWhereTypes {
  126.     kHD,
  127.     kFloppy1,
  128.     kFloppy2,
  129.     kFloppy3,
  130.     kAppleShare,
  131.     kRAMDisk,
  132.     kTOPS,
  133.     kAUXVolume,
  134.     kCDROM,
  135.     kUnknown
  136. };
  137. typedef enum VolWhereTypes VolWhereTypes;
  138.  
  139. enum VolStatusTypes {
  140.     OnLine,
  141.     OffLine,
  142.     Unmounted
  143. };
  144. typedef enum VolStatusTypes VolStatusTypes;
  145.  
  146.  
  147. #endif // REZ
  148. #ifdef __cplusplus
  149. }
  150. #endif    // __cplusplus
  151. #endif    // __SAM_PLUGIN__